<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
<head>
    <meta charset="utf-8"/>
    <title>CMS后台管理系统</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <link th:replace="resource :: css" rel="stylesheet"/>
</head>
<body>
<div class="container-fluid">
    <nav class="navbar navbar-default" role="navigation">
        <div class="container-fluid">
            <div class="navbar-header">
                <a class="navbar-brand" href="javascript:void(0);">栏目管理</a>
            </div>
        </div>
    </nav>
    <table class="table table-bordered table-hover">
        <thead>
        <tr>
            <th colspan="8"></th>
            <th><a type="button" class="btn btn-success btn-sm" href="add">新建</a></th>
        </tr>
        <tr>
            <th>ID</th>
            <th>栏目名</th>
            <th>单页面</th>
            <th>导航栏</th>
            <th>首页中</th>
            <th>上级</th>
            <th>点击量</th>
            <th>状态</th>
            <th width="93px">操作</th>
        </tr>
        </thead>
        <tbody>
            <tr th:each="entity : ${page.content}">
            <tr>
                <td>$!entity.id</td>
                <td>$!entity.name</td>
                <td>#if($!entity.isSingle)&#10004#end</td>
                <td>#if($!entity.showNavbar)&#10004#end</td>
                <td>#if($!entity.showHome)&#10004#end</td>
                <td>$!entity.parent.name</td>
                <td>$!entity.visitTotal</td>
                <td>$!entity.userState.name</td>
                <td>
                    <a class="btn btn-success btn-xs" data-id="$!entity.id" href="edit?id=$!entity.id">编辑</a>
                    <button type="button" class="btn btn-danger btn-xs remove-item" data-id="$!entity.id">删除</button>
                </td>
            </tr>
        </tbody>
    </table>
    #set($i=$!page.number + 1)
    <ul class="pagination" style="float:right" total="$!page.totalPages" index="$i"></ul>
</div>
    <script th:replace="resource :: js"></script>
</body>
</html>